package com.Iron.Dao.Impl;


import com.Iron.Dao.UserDao;
import com.Iron.Service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

@Repository("userDao")
/*@Scope("singleton")
@Lazy(true)*/
public class UserDaoImpl implements UserDao {


    public UserDaoImpl() {
        System.out.println("userDao创建");
    }

    @PostConstruct
    public void init(){
        System.out.println("userDao的初始化方法");
    }


    @PreDestroy
    public void destroy(){
        System.out.println("userDao的销毁方法");
    }
}
